{% extends 'BWLwebshopBundle:Page:showProducts.html.twig' %}

{% block title %}{{ item.name }}{% endblock %}

{% block body %}
    <link href="{{ asset('css/items.css') }}" type="text/css"
          rel="stylesheet"/>
    <h1>{{ item.name }}</h1>
    <ul class="itemList">
        <li><img src=../pictures/{{ item.image }} alt="{{ item.name }}
            image not found"
            class="small" />
        </li>
        <li>{{ item.name }}</li>
        <li>{{ item.salePrice }} €</li>
        {% if is_granted('IS_AUTHENTICATED_FULLY') %}
            <li><a href="{{ path('bwl_webshop_addToCart', { 'id': item.id }) }}" ><img src=../icon/shoppingCart.jpg alt="zum Warenkorb hinzufügen" class="small" /></a></li>
        {% endif %}
        <hr>
    </ul>

    <p>
        {{ item.description }}
    </p>
    {% if inclosingItems != null %}
        <h2>Bestandteile</h2>
        {% for inclosingItem in inclosingItems %}
            <a href="{{ path('bwl_webshop_showSpecificItem', { 'id': inclosingItem.item.id }) }}">
                <ul class="inclosingItemList">
                    <li>{{ inclosingItem.mass }} mal</li>
                    <li><img
                            src=../pictures/{{ inclosingItem.item.image }} alt="{{ inclosingItem.item.name }}
                        image not found"
                        class="small" />
                    </li>
                    <li>{{ inclosingItem.item.name }}</li>
                    <li>je {{ inclosingItem.item.salePrice }} €</li>
                    <hr>
                </ul>
            </a>

        {% endfor %}

    {% endif %}
{% endblock %}